package com.async.designpatterns.create.builder;

/**
 * 建造者模式的核心，封装不同对象的构造方法，独立对象的构造过程,让代码层次更清晰
 */
public class Director {

    public static Product createProductByDirector(IBuilder builder){
        builder.initName();
        builder.initTime();
        builder.setCompany();
        builder.setPrice();
        builder.setType();
        return builder.create();
    }
}
